home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 42
/
Amiga Format AFCD42 (Issue 126, Aug 1999).iso
/
-serious-
/
programming
/
arexx
/
rxcmanager
/
examples
/
e2v.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-05-25
|
2KB
|
80 lines
/*
Author: Alfonso Ranieri <alfier@iol.it>
Desription: Export to a Voyager hotlist
Template: KEY,USER/K
Tipical usage: rx e2v >file
*/
call addlib("rmh.library",0,-30) then exit
call addlib("rxcmanager.library",0,-30) then exit
if ~open("STDERR","CONSOLE:","W") then stderr="STDOUT"
prg=programname("NOEXT")
if ~RMH_ReadArgs("KEY,USER/K") then do
call printfault(ioerr(),prg)
exit
end
if parm.0.flag then k = "#?"parm.0.value"#?"
else k = "#?"
if parm.1.flag then call CMUserData(parm.1.value)
patt.Name = k
patt.WWW = k
patt.Comment = k
num = CMFind("WWW GROUPS","URL","PATT")
if num=1 then call info "No url entry found"
else call info "Found" num "url(s)"
say '<! Voyager - Bookmarks.mcc >'
say '<!!! This is automatically generated... Do NOT edit !!!>'
say '<HTML>'
say '<TITLE>Voyager Bookmarks</TITLE>'
say '<BODY>'
say
say '<H1 ALIGN=CENTER>Voyager Bookmarks</H1>'
say '<HR>'
say '<UL>'
g=""
p=""
ng=0
do i=0 to num-1
if url.i.Group~=g then do
if g~="" then do
if url.i.Group~=g & url.i.parents="" then do
call endG
end
end
say "<LI>"url.i.Group"<UL>"
ng=ng+1
g=url.i.Group
end
if ~url.i.EmptyGroup then
say "<LI><A HREF=" || '"'url.i.WWW'"' || ">" || url.i.Name || "</A>"
end
call endG
say '</UL><BR>'
say '<HR>'
say '<a href="About:">Voyager 2.95 (15.3.98)</a>'
say '</BODY>'
say '</HTML>'
exit
info: procedure expose stderr prg
parse arg msg
call writeln(stderr,prg":" msg)
return
endG: procedure expose ng
do j=0 to ng-1
say "</UL>"
end
ng=0
return